﻿using DevExpress.XtraEditors;
using DXApplicationTangche.service;
using DXApplicationTangche.UC.圣同润.Service;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.圣同润
{
    public partial class Form达人信息详情 : DevExpress.XtraEditors.XtraForm
    {
        public Form达人信息详情(String id)
        {
            InitializeComponent();
            this.getData(id);
        }
        private void getData(String id)
        {
            ChanmamaAuthorDetailDTO chanmamaAuthorDetail = 达人Service.getChanmamaAuthorDetailInfoById(id);
            this.showDara(chanmamaAuthorDetail);
        }

        private void showDara(ChanmamaAuthorDetailDTO chanmamaAuthorDetail)
        {
            this.textBox达人名称.Text = chanmamaAuthorDetail.nickname;
            this.textBox认证信息.Text = chanmamaAuthorDetail.verify_name;
            this.textBox地区.Text = chanmamaAuthorDetail.city;
            this.textBox达人标签.Text = chanmamaAuthorDetail.label;
            this.textBox性别.Text = chanmamaAuthorDetail.gender.ToString();
            this.hyperLinkEdit达人主页.Text = chanmamaAuthorDetail.web_url;
            this.richTextBox达人简介.Text = chanmamaAuthorDetail.label;
            //
            this.textBox粉丝数.Text = chanmamaAuthorDetail.follower_count.ToString();
            this.textBox粉丝团数.Text = chanmamaAuthorDetail.fans_club_total.ToString();
            this.textBox粉丝月增长量.Text = chanmamaAuthorDetail.follower_incr.ToString();
            this.textBox月点赞增量.Text = chanmamaAuthorDetail.digg_incr.ToString();
            this.textBox平均赞粉比.Text = chanmamaAuthorDetail.aweme_digg_follower_ration.ToString();
            this.textBox平均点赞数.Text = chanmamaAuthorDetail.aweme_avg_digg_count_30.ToString();
            //this.textBox带货口碑.Text = chanmamaAuthorDetail..ToString();
            this.textBox直播场次.Text = chanmamaAuthorDetail.month_live_count.ToString();
            this.textBox历史总视频数.Text = chanmamaAuthorDetail.history_aweme_count.ToString();
            this.textBox平均月销售额.Text = chanmamaAuthorDetail.month_live_amount_text;
            this.textBox月场均销售额.Text = chanmamaAuthorDetail.month_avg_live_amount_text;
            this.textBox月直播平均场观.Text = chanmamaAuthorDetail.live_average_user_30.ToString();
            this.textBox自有品牌编码.Text = chanmamaAuthorDetail.self_brand_code;
            this.textBox自有品牌名.Text = chanmamaAuthorDetail.self_brand_name;
            try
            {
                this.pictureBox头像.Image = FileService.GetImageByUrl(chanmamaAuthorDetail.avatar);
            }
            catch { }
        }
    }
}